package com.pingxx.demo.config;


import com.pingxx.demo.kafka.TopicConsts;
import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.EnableKafka;
import org.springframework.kafka.config.TopicBuilder;

//@EnableKafka
//@Configuration
public class KafkaConfig {

    @Bean
    public NewTopic userTopic() {
        return TopicBuilder.name(TopicConsts.USER_TOPIC)
                .build();
    }

    @Bean
    public NewTopic sampleTopic() {
        return TopicBuilder.name(TopicConsts.SAMPLE_TOPIC)
                .build();
    }
}
